package org.example.design.designmode.singleton;

/**
 * @Auther: lingshi
 * @Date: 2020/5/10 17:09
 * @Description: 饿汉模式
 * 优点:效率高、速度快  在类加载的时候就已经创建
 * 缺点：在某些情况下内存开销很大
 */
public class BadmashSingleton {


    private  static BadmashSingleton idler = new BadmashSingleton();

    private BadmashSingleton(){}

    public  static BadmashSingleton getInstance(){
        return idler;
    }

}
